from django.contrib import admin
from blog.models import *


class CategoryAdmin(admin.ModelAdmin):
  """ Category admin """
  prepopulated_fields = {'slug': ('title',)}


class PostAdmin(admin.ModelAdmin):
  """ Post admin """
  prepopulated_fields = {'slug': ('title',)}


admin.site.register(Category, CategoryAdmin)
admin.site.register(Post, PostAdmin)